Class Zip

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----com.sun.java.swing.JFrame
                                           |
                                           +----Zip

public class Zip
extends JFrame
This class is the main program, it create the global action listener, the main panel, the menu bar and a zip archive, without name

Version:
1.0
Author:
Frank Moisant - Patrick Titiano
See Also:
AllActionListener, ZipMainPanel, ZipMenuBar, ZipArchive, ZipSelectedAddFile, ZipDirectoryExtracting, ZipMessageBox

Variable Index

 o allActionListener
 o mainPanel
 o menuBar
 o zipArchive

Constructor Index

 o Zip(String)
The Zip constructor, it construct the visual interface

Method Index

 o deleteSelectedFiles()
This method is use to delete all selected files in the zipTable
 o extractSelectedFiles()
this method is called to extract all selected files in the current archive display a ZipDirectoryExtracting to chose the directory to extract the selected files
 o isFileSelected()
This method return if an archive is opened
 o main(String[])
The main programm, it just create an instance Zip object
 o newZipArchive()
this method display a file dialog to chose the name of the archive and create it, and display a file chooser dialog (ZipSelectedAddFile)
 o openZipArchive()
Open a archive and set it as the current archive
 o selectAll()
This method select all rows in the zipTable
 o selectAndAddFiles()
Display a ZipSelecttedAddFile dialog to select the files to add into the current archive
 o selectNone()
This method unselect selected rows
 o selectStyle(String)
This method is used to change the Look and Feel of the application

Variables

 o allActionListener
 private AllActionListener allActionListener
 o mainPanel
 private ZipMainPanel mainPanel
 o menuBar
 private ZipMenuBar menuBar
 o zipArchive
 private ZipArchive zipArchive

Constructors

 o Zip
 public Zip(String title)
The Zip constructor, it construct the visual interface

Parameters:
title - the title of the application

Methods

 o openZipArchive
 public void openZipArchive()
Open a archive and set it as the current archive

 o newZipArchive
 public void newZipArchive()
this method display a file dialog to chose the name of the archive and create it, and display a file chooser dialog (ZipSelectedAddFile)

 o extractSelectedFiles
 public void extractSelectedFiles()
this method is called to extract all selected files in the current archive display a ZipDirectoryExtracting to chose the directory to extract the selected files

 o deleteSelectedFiles
 public void deleteSelectedFiles()
This method is use to delete all selected files in the zipTable

 o selectAndAddFiles
 public void selectAndAddFiles()
Display a ZipSelecttedAddFile dialog to select the files to add into the current archive

 o isFileSelected
 public boolean isFileSelected()
This method return if an archive is opened

Returns:
true if an active archive exist
 o selectAll
 public void selectAll()
This method select all rows in the zipTable

 o selectNone
 public void selectNone()
This method unselect selected rows

 o selectStyle
 public void selectStyle(String style)
This method is used to change the Look and Feel of the application

Parameters:
style - the swing predefined look and file, Windows, Motif, or Metal
 o main
 public static void main(String argv[])
The main programm, it just create an instance Zip object

Parameters:
argv - the command line